<template>
  <iszse-dataide :urls="urls" :http="http" :layout="layout">
    <template #topbar></template>
    <iszse-sider :urls="urls" :http="http" :myattr="999">
      <template #source="{ sourceData }">
        <div v-for="source in sourceData" :key="source.name">
          这是自定义的：{{ source.name }}
        </div>
      </template>
      <template #workspace="{ dirs }">
        <div v-for="dir in dirs" :key="dir.name">
          这是自定义的：{{ dir.name }}
        </div>
      </template>
    </iszse-sider>
  </iszse-dataide>
</template>

<script>
import { $http } from "@/api/service";

export default {
  data() {
    return {};
  },
  created() {
    this.http = $http;
    this.layout = { sider: true };
    this.urls = {
      /**核心接口 */
      // 1获取数据源datasources[GET]
      datasources: "/api/datasources",
      // 4获取工作空间目录结构:查询[GET]、创建[POST]?path=?&file=?、删除[DELETE]、修改[PUT]
      directories: "/api/file/directories",
      // 4获取单个文件内容信息查询[GET]、创建[POST]?path=?&id=?&file=?&qryNames=?、删除[DELETE]、修改[PUT]
      content: "/api/file/content",
      // 1脚本运行[POST]-biz\data_type\dataset_id\ext\script\service_name
      execscript: "/api/querys/execscript/rows",
    };
  },
  methods: {},
  mounted() {
    // $http("/api/datasources").then((d) => console.log(d));
  },
};
</script>

